<link type="text/css" href="<?=$base_url;?>images/js/jqueryui/css/smoothness/jquery-ui-1.8.24.custom.css" rel="stylesheet" />
<script type="text/javascript" src="<?=$base_url;?>images/js/jqueryui/js/jquery-ui-1.8.24.custom.min.js"></script>
<script type="text/javascript" src="<?=$base_url;?>images/js/jquery.validate.js?v1"></script>
<script type="text/javascript">
$(document).ready(function(){
    $("#frmContact").validate({
        rules:{
            name:{
                required:true
            },
            email:{
                required:true,
                email:true,
                remote:{
                    url:'<?=$base_url.$this->lang->lang();?>/checkEmailExits',
                    type:'post',
                    data:{email :function(){return $(':input[name="email"]').val();}}
                }
            },
            password:{
                required:true,
                minlength: 6
            },
            repassword:{
                //equalTo: ':input[name="password"]'
            },
            phone:{
                required:true
            },
            address:{
                required:true
            },
            city:{
                required: true
            },
            country:{
                required: true
            }
        } ,
        messages:{
            name:{
                required: "Vui lòng nhập họ và tên"
            },
            email:{
                required: "Vui lòng nhập địa chỉ email",
                email: "Nhập đúng email",
                remote:"Email này đã được sử dụng."
            },
            password:{
                required: "Vui lòng nhập mật khẩu",
                maxLength: "Nhập nhiều hơn 6 kí tự"
            },
            repassword:{
                //equalTo: "Nhập trùng với mật khẩu."
            },
            phone:{
                required: "Vui lòng nhập số điện thoại"
            },
            address:{
                required: "Vui lòng nhập địa chỉ"
            },
            city:{
                required: "Vui lòng nhập thành phố"
            },
            country:{
                required: "Vui lòng chọn quốc gia"
            }
        }
    });
});
</script>
<div class="col-right fl">
    <div class="productSellers">
        <div class="titleconstructioncol2"><h1><?=lang('register')?></h1></div>
        <span class="line730"></span>
        <div class="news">
            <form class="form-register" id="frmContact" name="frmContact" method="post" action="<?=$base_url.$this->lang->lang()?>/register">
                <span class="rowLabel"></span>
                <span class="rowLabel"><?=lang('name')?> <span style="display: inline-block; color: red;">(*)</span></span>
                <span class="rowInput"><input type="text" name="name" id="name" value="" /></span>
                <span class="rowLabel"><?=lang('email')?> <span style="display: inline-block; color: red;">(*)</span></span>
                <span class="rowInput"><input type="text" name="email" id="email" value="" /></span>
                <span class="rowLabel"><?=lang('password')?> <span style="display: inline-block; color: red;">(*)</span></span>
                <span class="rowInput"><input type="password" name="password" id="password" value="" /></span>
                <span class="rowLabel"><?=lang('re-password')?> <span style="display: inline-block; color: red;">(*)</span></span>
                <span class="rowInput"><input type="password" name="repassword" id="repassword" value="" /></span>
                <span class="rowLabel"><?=lang('phone')?> <span style="display: inline-block; color: red;">(*)</span></span>
                <span class="rowInput"><input type="text" name="phone" id="phone" value="" /></span>
                <span class="rowLabel"><?=lang('address')?> <span style="display: inline-block; color: red;">(*)</span></span>
                <span class="rowInput"><input type="text" name="address" id="address" value="" /></span>
                <span class="rowLabel"><?=lang('gender')?> <span style="display: inline-block; color: red;">(*)</span></span>
                <span class="rowInput">
                    <label style="color: #FFF;"><input type="radio" checked="checked" name="sex" value="0" /> <?=lang('male')?></label>
                    <label style="color: #FFF;"><input type="radio" name="sex" value="1" /> <?=lang('female')?></label>
                </span>
                <span class="rowLabel"><?=lang('city')?> <span style="display: inline-block; color: red;">(*)</span></span>
                <span class="rowInput"><input type="text" name="city" id="city" value="" /></span>
                <span class="rowLabel"><?=lang('country')?> <span style="display: inline-block; color: red;">(*)</span></span>
                <span class="rowInput"><input type="text" name="country" id="country" value="" /></span>
                <span class="rowInput" >
                    <input type="submit" class="button" value="<?=lang('register')?>" />
                    <input type="reset" class="button" value="<?=lang('reset')?>" />
                </span>
            </form>
        </div>
    </div>
</div>

